package edu.ccut.saturn.manager.bundles.core;

import java.util.ArrayList;
import java.util.List;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IDataInfo;
import edu.ccut.saturn.component.IDataItem;
import edu.ccut.saturn.component.IParameterContext;
import edu.ccut.saturn.component.SaturnDataManager;

public class QuerySaturnDataInfoByFullKey extends DefaultComponent {
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		String dataFullKey = (String) parameterContext.getParameterValue(0);
        IDataInfo dataInfo = SaturnDataManager.getInstance().getSaturnDataInfo(dataFullKey);
        List<IDataItem> list = new ArrayList<IDataItem>();
        list.addAll(dataInfo.values());
        parameterContext.setParameter(1, list);
	}
}